import { cookies } from 'next/headers';

// export const getSession = async (key) => {
//     const cookieStore = await cookies();
//     const value = cookieStore.get(key)?.value;
//     if (!value) return null;
//     return await decrypt(value);
// };

export const updateSession = async (name, value) => {
    const cookieStore = await cookies();
    if (!value) {
        cookieStore.delete(name);
    } else {
        cookieStore.set({
            name,
            value
        });
    }
};


